package sg.edu.nus.iss.stockex;

public class MovingAverage {
	
	public String code;
	public String date;
	public double high;
	public double low;
	public double close;
	public double open;
	
	//past 30 days of date for a particular code and date. ..
	
	public MovingAverage(String code, String date, double high, double low,
			double close, double open) {
		super();
		this.code = code;
		this.date = date;
		this.high = high;
		this.low = low;
		this.close = close;
		this.open = open;
	}
	
	public MovingAverage(String strLine) {
		super();
		String [] words = strLine.split("\t");
		this.code = words[0].trim();
		this.date = words[1].trim();
		this.high = Double.parseDouble(words[2].trim());
		this.low = Double.parseDouble(words[3].trim());
		this.close = Double.parseDouble(words[4].trim());
		this.open = Double.parseDouble(words[5].trim());
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public double getHigh() {
		return high;
	}
	public void setHigh(double high) {
		this.high = high;
	}
	public double getLow() {
		return low;
	}
	public void setLow(double low) {
		this.low = low;
	}
	public double getClose() {
		return close;
	}
	public void setClose(double close) {
		this.close = close;
	}
	public double getOpen() {
		return open;
	}
	public void setOpen(double open) {
		this.open = open;
	}
	
}
